import cn.wolfcode.wms.domain.Department;
import cn.wolfcode.wms.service.IDepartmentService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class App {
    @Autowired
    private IDepartmentService departmentService;

    /*@Test
    public void TestSaveOrUpdate() {
        Department entity = new Department();
        entity.setId(1L);
        entity.setName("俱乐");
        entity.setSn("ddddd");
        departmentService.saveOrUpdate(entity);
    }

    @Test
    public void TestGet() {
        System.out.println(departmentService.get(1L));
    }

    @Test
    public void TestDelete() {
        departmentService.delete(2L);
    }

    @Test
    public void TestList() {
        departmentService.list().forEach(System.out::println);
    }*/
}
